using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace VRCPRServer.NetWork
{
    public class Command
    {
        /// <summary>
        /// 连接模拟人指令（返回相同数据给电脑，连接后，主板灯长亮）
        /// </summary>
        public static readonly byte[] Connect = { 0xfc, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0xbb };

        /// <summary>
        /// 模拟人心跳包指令
        /// </summary>
        public static readonly byte[] Heart = { 0xfc, 0xff, 0x00, 0x00, 0x00, 0x00, 0xfb };

        /// <summary>
        /// VR心跳包指令
        /// </summary>
        public static readonly byte[] VRHeart = { 0x06, 0x0a, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15 };

        /// <summary>
        /// 开始操作指令，下位机返回相同数据，主板灯闪烁
        /// </summary>
        public static readonly byte[] Start = { 0xfc, 0xff, 0xdd, 0xdd, 0xdd, 0xdd, 0x6f };

        /// <summary>
        /// 停止操作指令，下位机返回相同数据，主板灯长亮
        /// </summary>
        public static readonly byte[] Stop = { 0xfc, 0xff, 0xf5, 0xf5, 0xf5, 0xf5, 0xcf };

        /// <summary>
        /// 救活模拟人指令，下位机返回相同数据，救活后，有自主搏动，瞳孔变为正常，主板灯长亮
        /// </summary>
        public static readonly byte[] Succeed = { 0xfc, 0xff, 0xaa, 0xaa, 0xaa, 0xaa, 0xa3 };

        /// <summary>
        /// 模拟人调试指令, 下位机会发出嗡嗡声代表进入调试状态
        /// </summary>
        public static readonly byte[] StartSet = { 0xfc, 0xff, 0xf4, 0xf4, 0xf4, 0xf4, 0xcb };

        /// <summary>
        /// 瞳孔正常指令(下位机不返回数据)
        /// </summary>
        public static readonly byte[] PupilNormally = { 0xfc, 0xff, 0xee, 0xee, 0xee, 0xee, 0xb3 };

        /// <summary>
        /// 瞳孔散大指令(下位机不返回数据)
        /// </summary>
        public static readonly byte[] Mydriasis = { 0xfc, 0xff, 0xcc, 0xcc, 0xcc, 0xcc, 0x2b };

        /// <summary>
        /// 模拟人调试指令, 下位机会发出嗡嗡声代表进入调试状态
        /// </summary>
        public static readonly byte[] StopSet = { 0xfc, 0xff, 0x88, 0x88, 0x88, 0x88, 0x1b };

        /// <summary>
        /// 连接状态指令
        /// </summary>
        public static readonly byte OperationData = 0x01;

        /// <summary>
        /// 连接状态指令
        /// </summary>
        public static readonly byte ConnectState = 0x03;

        /// <summary>
        /// 操作状态指令
        /// </summary>
        public static readonly byte OperationState = 0x04;

        /// <summary>
        /// 学员成绩指令
        /// </summary>
        public static readonly byte Score = 0x05;

        /// <summary>
        /// 学员按压速率
        /// </summary>
        public static readonly byte PressFrequency = 0x06;
    }
}

